package com.foolishbird.sdk.params.bean;

import android.os.Parcel;
import android.os.Parcelable;



public class State implements Parcelable {

    public static final int SUCCESS = 1;

    private int code;

    private String msg;

    public State() {
    }

    protected State(Parcel in) {
        code = in.readInt();
        msg = in.readString();
    }

    public static final Creator<State> CREATOR = new Creator<State>() {
        @Override
        public State createFromParcel(Parcel in) {
            return new State(in);
        }

        @Override
        public State[] newArray(int size) {
            return new State[size];
        }
    };

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(code);
        dest.writeString(msg);
    }
}
